<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        .content{
            float: left;
            overflow: hidden;
        }
        #content{
            width: 700px;
            height: 500px;
        }
    </style>
    <script src="js/jquery-1.8.3.min.js" type="text/javascript"></script>
</head>
<body>
<div id="header">
    账户:
    <span></span><img src="/upload/1.jpg" width="30" height="30">
    <a href="login.html">退出</a>
    <div>
        <div class="content">
            <a href="#">查询余额</a><br>
            <a href="#">转账</a><br>
            <a href="transform.html" target="myframe">转账记录</a><br>
            <a href="#">修改密码</a><br>
            <a href="upload.html" target="myframe">上传文件</a><br>
        </div>
        <div class="content" id ="content" >
            <iframe name="myframe" width="100%" height="100%"></iframe>
        </div>
    </div>
</div>
<script>
    $(function () {
        $.ajax({
            type: "get",
            url: "user/query.do",
            dataType: "json",
            //后端传入的数据 data
            success: function (data) {
                console.log(data)
                if (data.code == 1) {
                    $("span").html(data.info.bankCode),
                    $("img").attr("src", data.info.imgPath)
                } else {
                    alert("还未登录")
                    window.location.href = "login.html"
                }
            }
        })
    })
</script>
</body>
</html>